<template>
  <div class="sonb">
    <h3>{{ num }}</h3>
  </div>
</template>

<script>
export default {
  data () {
    return {
      num: ''
    }
  },
  mounted () {
    this.$bus.$on('num', num => {
      this.num = num
    })
  },
  beforeDestroy () {
    this.$bus.$off('num')
  }
}
</script>

<style>
.sonb {
  width: 400px;
  height: 400px;
  background-color: #cdd34d;
}
</style>
